/*
* Copyright (c) 2011
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
*
* Contributors:
*
* Description:
*
*/

#ifndef ROKUREMOTE_H
#define ROKUREMOTE_H

#include <QDialog>
#include <QTcpSocket>

#include <QtGui/QDialog>

#if defined Q_OS_SYMBIAN
#include "ui_WirelessRemote.h"
#else
#include "ui_WirelessRemote_Maemo.h"
#endif

QT_BEGIN_NAMESPACE
class QTcpSocket;
QT_END_NAMESPACE

class WirelessRemote : public QDialog
{
    Q_OBJECT

public:
    WirelessRemote(QWidget *parent = 0);
    ~WirelessRemote();

protected:
    void resizeEvent (QResizeEvent* event);
    
private slots:
        void downRequest();
        void upRequest();
        void leftRequest();
        void rightRequest();
        void homeRequest();
        void selectRequest();

        void forwardRequest();
        void backRequest();
        void playPauseRequest();

        void doRokuCommand();
        void displayError(QAbstractSocket::SocketError socketError);

        void settingsRequest();
        void aboutRequest();
        void helpRequest();
        void exitRequest();
        void searchRequest();
    
private:

        QString getStoredIpAddress();
        void saveIpAddress(QString ip);
        void setLandscapeOrientation();

public:
        void sendRokuCommand(QString command);
private:

    Ui::WirelessRemote ui;

    QTcpSocket *tcpSocket;
    
    QString rokuCommand;
    QString ipAddress;

};

#endif // ROKUREMOTE_H
